<script setup lang="tsx">
import type { MaybeRef, PropType } from 'vue'
import { useAttrs } from 'vue'
import type { DescriptionsSchema } from '../../Descriptions'
import { Descriptions } from '../../Descriptions'

defineProps({
  currentRow: {
    type: Object as PropType<any>,
    default: () => null,
  },
  detailSchema: {
    type: Array as PropType<MaybeRef<DescriptionsSchema[]>>,
    default: () => [],
  },
})

const attrs = useAttrs()
</script>

<template>
  <Descriptions :schema="detailSchema" :data="currentRow || {}" v-bind="attrs" />
</template>
